/**
 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.swt.mto.thithu.model;

import java.io.Serializable;

import java.util.ArrayList;
import java.util.List;

/**
 * This class is used by SOAP remote services.
 *
 * @author    tuan.nguyen
 * @generated
 */
public class ResultSoap implements Serializable {
	public static ResultSoap toSoapModel(Result model) {
		ResultSoap soapModel = new ResultSoap();

		soapModel.setResultId(model.getResultId());
		soapModel.setQuizId(model.getQuizId());
		soapModel.setUserId(model.getUserId());
		soapModel.setQuestionId(model.getQuestionId());
		soapModel.setUserName(model.getUserName());
		soapModel.setUserChoice(model.getUserChoice());
		soapModel.setCorrect(model.getCorrect());
		soapModel.setScore(model.getScore());

		return soapModel;
	}

	public static ResultSoap[] toSoapModels(Result[] models) {
		ResultSoap[] soapModels = new ResultSoap[models.length];

		for (int i = 0; i < models.length; i++) {
			soapModels[i] = toSoapModel(models[i]);
		}

		return soapModels;
	}

	public static ResultSoap[][] toSoapModels(Result[][] models) {
		ResultSoap[][] soapModels = null;

		if (models.length > 0) {
			soapModels = new ResultSoap[models.length][models[0].length];
		}
		else {
			soapModels = new ResultSoap[0][0];
		}

		for (int i = 0; i < models.length; i++) {
			soapModels[i] = toSoapModels(models[i]);
		}

		return soapModels;
	}

	public static ResultSoap[] toSoapModels(List<Result> models) {
		List<ResultSoap> soapModels = new ArrayList<ResultSoap>(models.size());

		for (Result model : models) {
			soapModels.add(toSoapModel(model));
		}

		return soapModels.toArray(new ResultSoap[soapModels.size()]);
	}

	public ResultSoap() {
	}

	public long getPrimaryKey() {
		return _resultId;
	}

	public void setPrimaryKey(long pk) {
		setResultId(pk);
	}

	public long getResultId() {
		return _resultId;
	}

	public void setResultId(long resultId) {
		_resultId = resultId;
	}

	public long getQuizId() {
		return _quizId;
	}

	public void setQuizId(long quizId) {
		_quizId = quizId;
	}

	public long getUserId() {
		return _userId;
	}

	public void setUserId(long userId) {
		_userId = userId;
	}

	public long getQuestionId() {
		return _questionId;
	}

	public void setQuestionId(long questionId) {
		_questionId = questionId;
	}

	public String getUserName() {
		return _userName;
	}

	public void setUserName(String userName) {
		_userName = userName;
	}

	public String getUserChoice() {
		return _userChoice;
	}

	public void setUserChoice(String userChoice) {
		_userChoice = userChoice;
	}

	public String getCorrect() {
		return _correct;
	}

	public void setCorrect(String correct) {
		_correct = correct;
	}

	public int getScore() {
		return _score;
	}

	public void setScore(int score) {
		_score = score;
	}

	private long _resultId;
	private long _quizId;
	private long _userId;
	private long _questionId;
	private String _userName;
	private String _userChoice;
	private String _correct;
	private int _score;
}